package com.myhome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.myhome.domain.Market;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.myhome.domain.UserFavoriteMarket;
import com.myhome.mapper.UserFavoriteMarketMapper;
import com.myhome.service.UserFavoriteMarketService;
/**
*@Author QYiXin 
* @Date 2021 11 05 08 45
**/
@Service
public class UserFavoriteMarketServiceImpl extends ServiceImpl<UserFavoriteMarketMapper, UserFavoriteMarket> implements UserFavoriteMarketService{

    @Override
    public boolean deleteUserFavoriteMarket(Long marketId, Long userId) {
        return this.remove(new LambdaQueryWrapper<UserFavoriteMarket>().eq(UserFavoriteMarket::getMarketId, marketId).eq(UserFavoriteMarket::getUserId, userId));
    }
}
